<template>
  <div id="Details">
    <!-- 标题 -->
    <h1 class="title">{{ this.dataildata.title }}</h1>

    <van-row type="flex" justify="space-between" class="desc">
      <van-col span="">来源:{{ this.dataildata.source }} </van-col>
      <van-col span="">{{ this.dataildata.date }}</van-col>
      <!-- 视频部分 -->
      <video
        :src="/pic&video/ + this.dataildata.video"
        controls
        style="width: 100%"
        poster="/pic&video/shiping.jpg"
      ></video>
    </van-row>

    <!-- 详情栏 -->
    <van-row v-html="this.dataildata.content" class="introduced"> </van-row>
    <div>
      <van-image :src="/pic&video/+this.dataildata.info_pic" style="width: 100%; margin: 0 15px;" />
    </div>
  </div>
</template>
<script>
// import $http from "../helper/http.js";
import axios from "axios";
import { Notify } from "vant";
export default {
  data() {
    return {
      detailid: 0,
      dataildata: {},
    };
  },
  created() {},
  mounted() {
    this.detailid = this.$route.query.id;
    console.log(this.detailid);
    // $http
    //   .get("http://localhost:3000/eventspec?id=" + this.detailid, "")
    //   .then((res) => {
    //     console.log(res.data);
    //     if (res.data.message == "ok") {
    //       this.dataildata = res.data.results[0];
    //     } else {
    //       Notify({ type: "warning", message: "未获取到数据" });
    //     }
    //   });
    axios
      .get("http://localhost:3000/eventspec?id=" + this.detailid, {})
      .then((res) => {
        console.log(res.data);
        if (res.data.message == "ok") {
          this.dataildata = res.data.results[0];
        } else {
          Notify({ type: "warning", message: "未获取到数据" });
        }
      });
  },
  methods: {},
};
</script>



<style scoped>
#Details {
  margin-bottom: 50px;
  width: 100%;
}
.title {
  font-size: 18px;
  text-align: center;
  padding: 15px 0 5px;
  margin: 0 15px; 
}
.desc {
  color: #888;
  line-height: 28px;
  font-size: 13px;
  margin: 0 10px;
}
.introduced {
  font-size: 15px;
  margin: 0 15px;
  text-indent: 1rem;
}
</style>